package com.lmx.repoDomain.tmodel;

import io.katharsis.resource.annotations.JsonApiResource;
import io.katharsis.resource.annotations.JsonApiToOne;
import com.lmx.repoDomain.tmodel.business.User;//huibati;
import javax.persistence.*;

/**
 * 客户标签表
 */
@Entity
@Table(name = "ccd_service_lable")
@JsonApiResource(type = "serviceLable")
public class ServiceLable extends BaseEntity {
	private String code; // 编码
	private User customerService;//客服
	private Dicttype lable;//标签
	private String remark;//备注

	@Column(name = "code")
	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	@JsonApiToOne
	@ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.REFRESH)
	@JoinColumn(name = "cs_id",foreignKey = @ForeignKey(name = "null"))
	public User getCustomerService() {
		return customerService;
	}

	public void setCustomerService(User customerService) {
		this.customerService = customerService;
	}

	@JsonApiToOne
	@ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.REFRESH)
	@JoinColumn(name = "lable_id",foreignKey = @ForeignKey(name = "null"))
	public Dicttype getLable() {
		return lable;
	}

	public void setLable(Dicttype lable) {
		this.lable = lable;
	}

	@Column(name = "remark")
	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}
}
